package com.example.demo.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.example.demo.dto.MainTheaterDto;
import com.example.demo.mapper.MainTheaterMapper;
import com.example.demo.service.MainTheaterService;
import com.woniuxy.movice.entity.MainTheater;

@Service
@Transactional
public class MainTheaterServiceImpl implements MainTheaterService{
	
	@Resource
	private MainTheaterMapper mainTheaterMapper;
	
	@Override
	public List<MainTheaterDto> getAllTheaterR() {
		return mainTheaterMapper.getAllTheater("已通过");
	}

	@Override
	public List<MainTheaterDto> getAllTheaterW() {
		return mainTheaterMapper.getAllTheater("未审核");
	}

	@Override
	public String PassTheater(int zid, int tyear) {
		if(mainTheaterMapper.PassTheater(zid, tyear)>0) {
			return "成功";
		}else {
			return "失败";
		}
	}

	@Override
	public String RefuseTheater(int zid) {
		if(mainTheaterMapper.RefuseTheater(zid)>0) {
			return "成功";
		}else {
			return "失败";
		}
	}

	@Override
	public String addTime(int zid, int tyear) {
		if(mainTheaterMapper.addTime(zid,tyear)>0) {
			return "成功";
		}else {
			return "失败";
		}
	}

}
